import { defineStore } from 'pinia'
import { ref } from 'vue'
 
export const useUserInfoStore = defineStore('userInfo', () => {
    const userInfo = ref({})
    const setInfo = (data) => {
        userInfo.value = data
    }
    const removeInfo= () => {
        userInfo.value = {}
    }
    return {
        userInfo, setInfo, removeInfo
    }
}, {
    persist: true//持久化存储
})

